package ae.pcfc.cldos.online.common.clddb.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;
import org.hibernate.envers.AuditTable;
import org.hibernate.envers.Audited;

import ae.pcfc.cldos.online.common.domain.BaseEntity;


/**
 * The persistent class for the T_CLDOS_PERSONAL_DETAILS database table.
 * 
 */
@Entity
@Table(name="T_CLDOS_EMPLOYMENT_VISA_CANCEL")
@Audited
@AuditTable(value="T_CLDOS_EVC_AUD")
public class EmploymentVisaCancel extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	public static final String EMPLOYEE_ID = "evcEmployeeId";
	
	@Id
	@GeneratedValue(generator="SQ_CLDOS_APP_ID")
	@GenericGenerator(name = "SQ_CLDOS_APP_ID",  strategy="foreign", parameters=@Parameter(name="property", value="AppMetaData"))
	@Column(name="APPLICATION_ID")
	private Long applicationId;
	
    @Temporal(TemporalType.DATE)
	@Column(name="EVC_CANCEL_DATE")
	private Date evcCancelDate;
	
	@Column(name="EVC_EMPLOYEE_ID")
	private String evcEmployeeId;

	@Temporal(TemporalType.DATE)
	@Column(name="EVC_EXIT_DATE")
	private Date evcExitDate;
	
	@Column(name="EVC_BANNED_FLG")
	@Type(type="yes_no")
	private boolean evcBannedFlag;
	
	@Column(name="EVC_LEAVING_REASON")
	private String evcLeavingReason;
	
	@Column(name="EVC_BAN_PERIOD")
	private String evcBanPeriod;
	
	@Column(name="EVC_CANCEL_FORM")
	private String evcCancelform;
		
	//bi-directional many-to-one association to AppMetaData
	@OneToOne(fetch=FetchType.LAZY, cascade=CascadeType.ALL, optional=true)
	@PrimaryKeyJoinColumn
	private AppMetaData AppMetaData;

	
	public EmploymentVisaCancel() {
		
	}

	public String getEvcEmployeeId() {
		return evcEmployeeId;
	}

	public void setEvcEmployeeId(String evcEmployeeId) {
		this.evcEmployeeId = evcEmployeeId;
	}

	public Date getEvcExitDate() {
		return evcExitDate;
	}

	public void setEvcExitDate(Date evcExitDate) {
		this.evcExitDate = evcExitDate;
	}

	public Date getEvcCancelDate() {
		return evcCancelDate;
	}

	public void setEvcCancelDate(Date evcCancelDate) {
		this.evcCancelDate = evcCancelDate;
	}

	public boolean getEvcBannedFlag() {
		return evcBannedFlag;
	}

	public void setEvcBannedFlag(boolean evcBannedFlag) {
		this.evcBannedFlag = evcBannedFlag;
	}

	public String getEvcLeavingReason() {
		return evcLeavingReason;
	}

	public void setEvcLeavingReason(String evcLeavingReason) {
		this.evcLeavingReason = evcLeavingReason;
	}

	public String getEvcBanPeriod() {
		return evcBanPeriod;
	}

	public void setEvcBanPeriod(String evcBanPeriod) {
		this.evcBanPeriod = evcBanPeriod;
	}

	public String getEvcCancelform() {
		return evcCancelform;
	}

	public void setEvcCancelform(String evcCancelform) {
		this.evcCancelform = evcCancelform;
	}

	public AppMetaData getAppMetaData() {
		return AppMetaData;
	}

	public void setAppMetaData(AppMetaData appMetaData) {
		AppMetaData = appMetaData;
	}

	public Long getApplicationId() {
		return applicationId;
	}

	public void setApplicationId(Long applicationId) {
		this.applicationId = applicationId;
	}



	
}